void setup() {
  pinMode(29, INPUT);
  pinMode(31, OUTPUT);
}

void loop() {
  if (digitalRead(29)) {
    digitalWrite(31, LOW);
  } else {
    digitalWrite(31, HIGH);

  }
}
